package com.king.micro.common.dao;

import com.zeus.framework.commons.json.DataTransferObject;
import com.king.micro.common.entity.User;
import com.king.micro.common.exception.BusinessException;
import org.springframework.stereotype.Repository;

/**
 * @author 赵晓光
 *         created 2017/11/10 16:57
 *         copyright 2017 micro
 * @FileName: UserDao.java
 * package: com.king.micro.common
 */
@Repository("common.UserDao")
public class UserDao {

    public String  findById(String fid) {
        if(1==0) {
            User user = new User();
            user.setFid(fid);
            user.setName("zhoxg");
            DataTransferObject dto= new DataTransferObject();
            dto.putValue("data",user);
            return dto.toJsonString();
        } else {
            throw new BusinessException("查询失败");
        }
    }
}
